package com.dc.system.service;

import com.dc.common.model.BaseModel;
import com.dc.system.model.SysDept;
import com.dc.system.model.SysOrgan;
import com.github.pagehelper.PageInfo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @Description: SysDeptService
 * @Author: ChenXueLi
 * @Date: 2018-05-05 9:19
 */
public interface SysDeptService {

    /**
     * 添加一个部门
     * @param sysDept
     * @param sysOrgan
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel addSysDept(SysDept sysDept, SysOrgan sysOrgan, BaseModel baseModel, HttpServletRequest request) throws Exception;

    /**
     * 根据部门id删除一个部门
     * @param sysDept
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel deleteSysDeptById(SysDept sysDept, BaseModel baseModel, HttpServletRequest request) throws Exception;

    /**
     * 根据部门id修改一个部门的信息
     * @param sysDept
     * @param sysOrgan
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel updateSysDeptById(SysDept sysDept, SysOrgan sysOrgan, BaseModel baseModel, HttpServletRequest request) throws Exception;

    /**
     * 分页查询所有部门
     * @param pageInfo
     * @param sysDept
     * @param sysOrgan
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel getSysDepts(PageInfo<?> pageInfo, SysDept sysDept, SysOrgan sysOrgan, BaseModel baseModel, HttpServletRequest request) throws Exception;

    /**
     * 向单位中添加部门（绑定）
     * @param sysDept
     * @param sysOrgan
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel bindDeptAndOrgan(SysDept sysDept, SysOrgan sysOrgan, BaseModel baseModel, HttpServletRequest request) throws Exception;

    /**
     * 解绑
     * @param sysDept
     * @param sysOrgan
     * @param baseModel
     * @param request
     * @return
     * @throws Exception
     */
    BaseModel deleteBindDeptAndOrgan(SysDept sysDept, SysOrgan sysOrgan, BaseModel baseModel, HttpServletRequest request) throws Exception;

}
